package com.oocl.o2o.admin.util;

import java.net.URLConnection;

import javax.ws.rs.core.MediaType;

import com.sun.jersey.api.client.Client;
import com.sun.jersey.api.client.ClientResponse;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.representation.Form;

public class NotifyUtil {
	public static void notifyAuditInfo(String username,int status,String content) {
		Client client = Client.create();
		Form form = new Form();
		form.add("username", username);
		form.add("status", status);
		form.add("content", content);
		String url = "http://10.222.29.156:8081/o2o-merchant/updateAudit/";
		WebResource wr = client.resource(url);
		ClientResponse resp = wr.accept(MediaType.APPLICATION_JSON_TYPE).post(ClientResponse.class,form);
		String s = resp.getEntity(String.class);
		System.out.println(s);
	}
//	public static void main(String[] args) {
//		notifyAuditInfo("marvin20", 2, "有问题");
//	}
}
